/*
编写 : Hexh
时间 : 2012-5-25 15:23:01
*/
using System.Collections.Generic;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Repositories;
using HMIS.Infrastructure.Core.Entities;

namespace HMIS.Infrastructure.Facade.Impl
{
	/// <summary>
	///	 the impl of IInfraApproveLogFacade
	/// </summary>
	public class InfraApproveLogFacadeImpl : IInfraApproveLogFacade
	{

		private readonly IInfraApproveLogRepository InfraApproveLogRepository;

		public InfraApproveLogFacadeImpl(IInfraApproveLogRepository InfraApproveLogRepository)
		{
			this.InfraApproveLogRepository = InfraApproveLogRepository;
		}

		#region IInfraApproveLog Entity Save,Get,Update,Delete

		public InfraApproveLog Get(string id)
		{
			return InfraApproveLogRepository.Get(id);
		}

		public InfraApproveLog Load(string id)
		{
			return InfraApproveLogRepository.Load(id);
		}

		public void SaveOrUpdate(InfraApproveLog entity)
		{
			this.InfraApproveLogRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			InfraApproveLogRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			InfraApproveLogRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return InfraApproveLogRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return InfraApproveLogRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<InfraApproveLog> GetAll()
		{
			return InfraApproveLogRepository.GetAll();
		}

		public IList<InfraApproveLog> GetPlist(string approveItemId, string approveType, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return InfraApproveLogRepository.GetPlist(approveItemId, approveType, start, limit, sort, dir, filters, out total);
		}
		
		#endregion
	}
}
